<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "customer_activity_forbid".
 *
 * @property int $id
 * @property int $customer_id 客户id
 * @property int $activity_id 活动id
 * @property int $activity_type 活动类型
 * @property int $status 状态
 * @property int $created_at 创建时间
 */
class CustomerActivityForbid extends Base
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'customer_activity_forbid';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['customer_id', 'activity_id', 'activity_type', 'status', 'created_at'], 'integer']
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'customer_id' => 'Customer ID',
            'activity_id' => 'Activity ID',
            'activity_type' => 'Activity Type',
            'status' => 'Status',
            'created_at' => 'Created At',
        ];
    }

    public function getCustomer(){
        return $this->hasOne(Customer::class, ['id' => 'customer_id']);
    }
}
